﻿#pragma once

#include "AbilitySystemComponent.h"
#include "TestAbilitySystemComponent.generated.h"

UCLASS()
class TEST002_API UTestAbilitySystemComponent : public UAbilitySystemComponent
{
	GENERATED_BODY()
public:
	UTestAbilitySystemComponent();
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
	
protected:
	UFUNCTION(BlueprintCallable, Category = "TestAbilitySystemComponent", meta = (DisplayName = "GetSpawnedAttributes"))
	TArray<UAttributeSet*> BP_GetSpawnedAttributes() const;

	UPROPERTY(VisibleAnywhere)
	TArray<UAttributeSet*>	TestSpawnedAttributes;

public:
	UFUNCTION(BlueprintCallable, Category = "TestAbilitySystemComponent", meta = (DisplayName = "GetNumericAttribute"))
	float BP_GetNumericAttribute() const;

public:
	/** Replicates the Generic Replicated Event to the server with payload. */
	UFUNCTION(Client, reliable, WithValidation)
	void ClientSetReplicatedEventWithPayload(EAbilityGenericReplicatedEvent::Type EventType, FGameplayAbilitySpecHandle AbilityHandle, FPredictionKey AbilityOriginalPredictionKey, FVector_NetQuantize100 VectorPayload);

	UFUNCTION(BlueprintCallable)
	void EquipAbility(TSubclassOf<UGameplayAbility> AbilityClass);
};
